<?php

namespace App\Models;

use Dcat\Admin\Models\Administrator;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\AdminUserGroup
 *
 * @mixin IdeHelperAdminUserGroup
 * @property int $id
 * @property int $user_id
 * @property string $name
 * @property string|null $description
 * @property string|null $file
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup query()
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup whereDescription($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup whereFile($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup whereUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup withTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|AdminUserGroup withoutTrashed()
 * @mixin \Eloquent
 */
class AdminUserGroup extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'admin_user_groups';

    public function admin()
    {
        return $this -> belongsTo(Administrator::class, 'user_id', 'id');
    }
}
